package com.chanta.server.persistence;

import java.util.List;
import java.util.Set;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

/**
 * TODO Please comment this class..
 * 
 * @author Hakan Özdemir - Vendoo Inc.
 * @date 02.11.2013
 * 
 */
@PersistenceCapable
public class Seenlist {

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Key key;

	@Persistent(mappedBy = "seenlist")
	private User user;

	@Persistent
	private Set<Key> items;

	@Persistent(mappedBy = "seenlist")
	private List<SeenlistElement> seenlistElements;

	/**
	 * Getter for user.
	 * 
	 * @return user
	 */
	public User getUser() {
		return user;
	}

	/**
	 * Setter for user.
	 * 
	 * @param user
	 *            the user to set
	 */
	public void setUser(User user) {
		this.user = user;
	}

	/**
	 * Getter for items.
	 * 
	 * @return items
	 */
	public Set<Key> getItems() {
		return items;
	}

	/**
	 * Setter for items.
	 * 
	 * @param items
	 *            the items to set
	 */
	public void setItems(Set<Key> items) {
		this.items = items;
	}

	/**
	 * Getter for seenlistElements.
	 * 
	 * @return seenlistElements
	 */
	public List<SeenlistElement> getSeenlistElements() {
		return seenlistElements;
	}

	/**
	 * Setter for seenlistElements.
	 * 
	 * @param seenlistElements
	 *            the seenlistElements to set
	 */
	public void setSeenlistElements(List<SeenlistElement> seenlistElements) {
		this.seenlistElements = seenlistElements;
	}
}
